package com.whiteape.book.utils;

import com.whiteape.book.model.type.HomePageLayoutType;

import org.greenrobot.greendao.converter.PropertyConverter;

import java.util.HashMap;

public class HomepageLayoutTypeConverter implements PropertyConverter<HomePageLayoutType, String> {
        @Override
        public HomePageLayoutType convertToEntityProperty(String databaseValue) {
            return HomePageLayoutType.valueOf(databaseValue);
        }

        @Override
        public String convertToDatabaseValue(HomePageLayoutType entityProperty) {
            return entityProperty.name();
        }
    }